require 'enhanceutils'

e1=EnhanceUtils.detect_buffer_encoding("\xff\xfe\x0d\x00\x0a\x00\x2f\x00\x2f\x00\x20\x00\x48\x00\x65\x00")
puts "Encoding1: #{e1}"
e2=EnhanceUtils.detect_buffer_encoding("dddewdwdewdewdewdewded")
puts "Encoding2: #{e2}"
e3=EnhanceUtils.detect_buffer_encoding("dddewdwd\0ewdewdewdewded")
puts "Encoding2: #{e3}"
